function fanyi(intxt) {
    var appid = '20180718000186694';
    var key = '6hlRV5ytiy0S_8QKQRMJ';
    var salt = 1435660288; //(new Date).getTime();
    var query = 'apple';
    // 多个query可以用\n连接  如 query='apple\norange\nbanana\npear'
    var from = 'en';
    var to = 'zh';
    var str1 = appid + query + salt + key;
    var sign = MD5(str1);
    //var intxt = document.getElementById("txt01").value;
    var inmd5 = appid + intxt + salt + key;
    var outmd5 = MD5(inmd5);
    var httpadrs = "https://api.fanyi.baidu.com/api/trans/vip/translate?q=" + intxt + "&from=en&to=zh&appid=20180718000186694&salt=1435660288&sign=" + outmd5;
    var outtxt = '';
    $.ajax({
        url: httpadrs,
        type: 'GET',
        dataType: 'JSONP',
        success: function(data) {
            //提取json中的汉语翻译部分
            outtxt = data.trans_result[0].dst;

        }
    });
    return outtxt;
}